/* 水果超市管理系统专用样式 */

/* 全局颜色变量 */
:root {
  --fruit-green: #4CAF50;
  --fruit-orange: #FF9800;
  --fruit-red: #F44336;
  --fruit-yellow: #FFEB3B;
  --fruit-purple: #9C27B0;
  --fruit-light-green: #8BC34A;
  --fruit-light-bg: #f9f9f9;
  --fruit-dark-text: #333333;
}

/* 全局样式调整 */
body {
  background-color: var(--fruit-light-bg);
  color: var(--fruit-dark-text);
  font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

/* 导航栏样式 */
.nav {
  background: linear-gradient(to right, var(--fruit-green), var(--fruit-light-green));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.layui-nav .layui-nav-item a {
  color: #fff;
  font-weight: 500;
  transition: all 0.3s;
}

.layui-nav .layui-this:after,
.layui-nav-bar,
.layui-nav-tree .layui-nav-itemed:after {
  background-color: var(--fruit-yellow);
  height: 3px;
}

.layui-nav .layui-nav-item a:hover {
  color: var(--fruit-yellow);
  background-color: rgba(255, 255, 255, 0.1);
}

/* 首页标题样式 */
.index-title {
  color: var(--fruit-green);
  position: relative;
  padding-bottom: 15px;
  margin-bottom: 25px;
}

.index-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--fruit-orange);
}

/* 商品卡片样式 */
.data-container .data-list .data-item {
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background-color: #fff;
  overflow: hidden;
}

.data-container .data-list .data-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--fruit-green);
}

.data-container .data-list .data-item .cover {
  transition: all 0.5s;
  border-radius: 8px 8px 0 0;
}

.data-container .data-list .data-item:hover .cover {
  transform: scale(1.05);
}

.data-container .data-list .data-item .title {
  background: var(--fruit-green);
  color: #FFFFFF;
  font-weight: bold;
  border-radius: 0;
}

.data-container .data-list .data-item .price {
  color: var(--fruit-red);
  font-weight: bold;
}

/* 按钮样式 */
.btn-theme, .btn-submit, .layui-btn {
  background: var(--fruit-green);
  border-radius: 4px;
  transition: all 0.3s;
}

.btn-theme:hover, .btn-submit:hover, .layui-btn:hover {
  background: var(--fruit-light-green);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 轮播图样式 */
.layui-carousel-ind li.layui-this {
  background-color: var(--fruit-green);
  width: 30px;
}

.layui-carousel-ind li {
  background-color: rgba(255, 255, 255, 0.7);
}

/* 首页新闻样式 */
.news-home-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  padding: 30px;
}

.news-home-container .layui-colla-title {
  background: var(--fruit-light-bg);
  border-left: 4px solid var(--fruit-green);
  color: var(--fruit-dark-text);
  transition: all 0.3s;
}

.news-home-container .layui-colla-title:hover {
  background: var(--fruit-green);
  color: #FFFFFF;
}

/* 底部导航栏 */
.nav-bottom {
  background: var(--fruit-dark-text);
}

.footer {
  background-color: #f5f5f5;
  padding: 20px 0;
  border-top: 1px solid #eee;
}

.footer-item {
  color: #666;
}

/* 详情页样式 */
.data-detail {
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

.data-detail .title {
  color: var(--fruit-dark-text);
  border: none;
  border-left: 5px solid var(--fruit-green);
  padding-left: 15px;
}

.data-detail .price {
  color: var(--fruit-red);
  font-size: 24px;
}

/* 水果主题元素 */
.fruit-icon {
  display: inline-block;
  margin-right: 5px;
}

/* 分页样式 */
.layui-laypage .layui-laypage-curr .layui-laypage-em {
  background-color: var(--fruit-green);
  border-radius: 2px;
}

/* 表单元素样式 */
.layui-form-checked[lay-skin=primary] i {
  border-color: var(--fruit-green);
  background-color: var(--fruit-green);
}

.layui-form-radio>i:hover, .layui-form-radioed>i {
  color: var(--fruit-green);
}

.layui-form-select dl dd.layui-this {
  background-color: var(--fruit-green);
}

/* 登录页面样式 */
.login-container {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.login-bg {
  background-image: url(../img/fruit-bg.jpg);
  opacity: 0.9;
}

/* 水果主题装饰元素 */
.fruit-decoration {
  position: relative;
}

.fruit-decoration:before {
  content: "🍎";
  position: absolute;
  left: -25px;
  top: 50%;
  transform: translateY(-50%);
}

.fruit-decoration:after {
  content: "🍊";
  position: absolute;
  right: -25px;
  top: 50%;
  transform: translateY(-50%);
}

/* 响应式调整 */
@media screen and (max-width: 992px) {
  .container {
    width: 100%;
    padding: 0 20px;
  }
  
  .fruit-header h1 {
    font-size: 24px;
  }
  
  .fruit-detail-header {
    flex-direction: column;
  }
  
  .fruit-detail-image {
    max-width: 100%;
  }
  
  .fruit-stats-container {
    flex-direction: column;
  }
  
  .fruit-stat-card {
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .fruit-header::before,
  .fruit-header::after {
    display: none;
  }
  
  .fruit-promotion-banner::before {
    display: none;
  }
  
  .fruit-promotion-banner p {
    max-width: 100%;
  }
  
  .fruit-footer-container {
    flex-direction: column;
  }
  
  .fruit-footer-section {
    width: 100%;
  }
  
  .fruit-cart-item {
    flex-wrap: wrap;
  }
  
  .fruit-cart-item .quantity {
    margin-left: 0;
    margin-top: 10px;
  }
}

@media screen and (max-width: 576px) {
  .fruit-category-tags {
    flex-direction: column;
  }
  
  .fruit-category-tag {
    width: 100%;
    text-align: center;
  }
  
  .fruit-product-card .price-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .fruit-product-card .add-to-cart {
    margin-top: 10px;
  }
}

/* 添加水果主题卡片和列表样式 */
.fruit-product-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  position: relative;
  background: #fff;
  margin-bottom: 20px;
}

.fruit-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.fruit-product-card .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
}

.fruit-product-card .badge.new {
  background: var(--fruit-green);
  color: white;
}

.fruit-product-card .badge.sale {
  background: var(--fruit-red);
  color: white;
}

.fruit-product-card .badge.seasonal {
  background: var(--fruit-orange);
  color: white;
}

.fruit-product-card .image-container {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.fruit-product-card .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s;
}

.fruit-product-card:hover .image-container img {
  transform: scale(1.1);
}

.fruit-product-card .content {
  padding: 15px;
}

.fruit-product-card .title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--fruit-dark-text);
}

.fruit-product-card .price-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.fruit-product-card .price {
  font-size: 20px;
  font-weight: bold;
  color: var(--fruit-red);
}

.fruit-product-card .unit {
  color: #888;
  font-size: 14px;
}

.fruit-product-card .old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
  margin-right: 8px;
}

.fruit-product-card .add-to-cart {
  background: var(--fruit-green);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.fruit-product-card .add-to-cart:hover {
  background: var(--fruit-light-green);
  transform: scale(1.1);
}

/* 水果分类标签 */
.fruit-category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.fruit-category-tag {
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  background: #f0f0f0;
  color: var(--fruit-dark-text);
}

.fruit-category-tag:hover, .fruit-category-tag.active {
  background: var(--fruit-green);
  color: white;
}

.fruit-category-tag.citrus {
  border-left: 3px solid var(--fruit-orange);
}

.fruit-category-tag.berries {
  border-left: 3px solid var(--fruit-red);
}

.fruit-category-tag.tropical {
  border-left: 3px solid var(--fruit-yellow);
}

.fruit-category-tag.seasonal {
  border-left: 3px solid var(--fruit-purple);
}

/* 水果促销横幅 */
.fruit-promotion-banner {
  background: linear-gradient(135deg, var(--fruit-green), var(--fruit-light-green));
  border-radius: 10px;
  padding: 20px;
  margin: 30px 0;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fruit-promotion-banner::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.fruit-promotion-banner h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.fruit-promotion-banner p {
  font-size: 16px;
  margin-bottom: 15px;
  max-width: 70%;
}

.fruit-promotion-banner .btn {
  background: white;
  color: var(--fruit-green);
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: bold;
  transition: all 0.3s;
}

.fruit-promotion-banner .btn:hover {
  background: var(--fruit-yellow);
  color: var(--fruit-dark-text);
}

/* 水果统计卡片 */
.fruit-stats-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 30px 0;
}

.fruit-stat-card {
  flex: 1;
  min-width: 200px;
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.3s;
}

.fruit-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.fruit-stat-card .icon {
  font-size: 36px;
  margin-bottom: 15px;
  color: var(--fruit-green);
}

.fruit-stat-card .number {
  font-size: 28px;
  font-weight: bold;
  color: var(--fruit-dark-text);
  margin-bottom: 5px;
}

.fruit-stat-card .label {
  color: #888;
  font-size: 14px;
}

/* 水果详情页增强 */
.fruit-detail-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  margin: 30px 0;
}

.fruit-detail-header {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  padding: 30px;
}

.fruit-detail-image {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  border-radius: 8px;
  overflow: hidden;
}

.fruit-detail-image img {
  width: 100%;
  height: auto;
  transition: all 0.5s;
}

.fruit-detail-image:hover img {
  transform: scale(1.05);
}

.fruit-detail-info {
  flex: 1;
  min-width: 300px;
}

.fruit-detail-info h1 {
  font-size: 28px;
  color: var(--fruit-dark-text);
  margin-bottom: 15px;
}

.fruit-detail-info .price {
  font-size: 32px;
  font-weight: bold;
  color: var(--fruit-red);
  margin-bottom: 20px;
}

.fruit-detail-info .description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.fruit-detail-info .nutrition {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.fruit-detail-info .nutrition h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--fruit-green);
}

.fruit-detail-info .nutrition ul {
  list-style: none;
  padding: 0;
}

.fruit-detail-info .nutrition li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
}

.fruit-detail-info .nutrition li:last-child {
  border-bottom: none;
}

.fruit-detail-tabs {
  padding: 0 30px 30px;
}

/* 购物车样式增强 */
.fruit-cart-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #eee;
  transition: all 0.3s;
}

.fruit-cart-item:hover {
  background: #f9f9f9;
}

.fruit-cart-item .image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 15px;
}

.fruit-cart-item .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fruit-cart-item .info {
  flex: 1;
}

.fruit-cart-item .name {
  font-weight: bold;
  margin-bottom: 5px;
}

.fruit-cart-item .price {
  color: var(--fruit-red);
  font-weight: bold;
}

.fruit-cart-item .quantity {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.fruit-cart-item .quantity button {
  width: 30px;
  height: 30px;
  border: 1px solid #eee;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.fruit-cart-item .quantity button:hover {
  background: var(--fruit-green);
  color: white;
  border-color: var(--fruit-green);
}

.fruit-cart-item .quantity input {
  width: 40px;
  height: 30px;
  text-align: center;
  border: 1px solid #eee;
  margin: 0 5px;
}

.fruit-cart-item .remove {
  color: #999;
  cursor: pointer;
  margin-left: 15px;
  transition: all 0.3s;
}

.fruit-cart-item .remove:hover {
  color: var(--fruit-red);
}

.fruit-cart-summary {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.fruit-cart-summary .row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}

.fruit-cart-summary .row:last-child {
  border-bottom: none;
}

.fruit-cart-summary .total {
  font-size: 20px;
  font-weight: bold;
  color: var(--fruit-red);
}

.fruit-cart-summary .checkout-btn {
  background: var(--fruit-green);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: bold;
  width: 100%;
  margin-top: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.fruit-cart-summary .checkout-btn:hover {
  background: var(--fruit-light-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 页面顶部水果主题标题栏 */
.fruit-header {
  background: linear-gradient(to right, var(--fruit-green), var(--fruit-light-green));
  color: white;
  padding: 15px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fruit-header::before {
  content: "🍎";
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  opacity: 0.8;
}

.fruit-header::after {
  content: "🍊";
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  opacity: 0.8;
}

.fruit-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: bold;
}

.fruit-header p {
  margin: 5px 0 0;
  font-size: 14px;
  opacity: 0.9;
}

/* 水果超市logo样式 */
.fruit-logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.fruit-logo img {
  height: 40px;
  margin-right: 10px;
}

.fruit-logo:hover {
  text-decoration: none;
  color: var(--fruit-yellow);
}

/* 水果主题页脚样式 */
.fruit-footer {
  background: var(--fruit-dark-text);
  color: white;
  padding: 40px 0 20px;
  margin-top: 50px;
}

.fruit-footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.fruit-footer-section {
  flex: 1;
  min-width: 200px;
}

.fruit-footer-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--fruit-light-green);
  position: relative;
  padding-bottom: 10px;
}

.fruit-footer-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--fruit-light-green);
}

.fruit-footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fruit-footer-section ul li {
  margin-bottom: 10px;
}

.fruit-footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  transition: all 0.3s;
}

.fruit-footer-section ul li a:hover {
  color: white;
  padding-left: 5px;
}

.fruit-footer-section p {
  color: #ccc;
  line-height: 1.6;
}

.fruit-footer-section .social-icons {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.fruit-footer-section .social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.fruit-footer-section .social-icon:hover {
  background: var(--fruit-green);
  transform: translateY(-3px);
}

.fruit-footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #999;
  font-size: 14px;
}

/* 水果主题动画效果 */
@keyframes fruitBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes fruitRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fruitPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.fruit-bounce {
  animation: fruitBounce 2s ease-in-out infinite;
}

.fruit-rotate {
  animation: fruitRotate 8s linear infinite;
}

.fruit-pulse {
  animation: fruitPulse 2s ease-in-out infinite;
}

/* 页面加载动画 */
.fruit-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.fruit-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.fruit-loader-content {
  text-align: center;
}

.fruit-loader-spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--fruit-green);
  border-bottom-color: var(--fruit-orange);
  animation: fruitRotate 1.5s linear infinite;
}

.fruit-loader-text {
  margin-top: 15px;
  font-size: 16px;
  color: var(--fruit-dark-text);
}

/* 水果主题表单样式 */
.fruit-form {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  max-width: 600px;
  margin: 30px auto;
}

.fruit-form-title {
  text-align: center;
  margin-bottom: 30px;
  color: var(--fruit-green);
  font-size: 24px;
  font-weight: bold;
}

.fruit-form-group {
  margin-bottom: 20px;
}

.fruit-form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--fruit-dark-text);
}

.fruit-form-input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.3s;
}

.fruit-form-input:focus {
  border-color: var(--fruit-green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
  outline: none;
}

.fruit-form-select {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  transition: all 0.3s;
}

.fruit-form-select:focus {
  border-color: var(--fruit-green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
  outline: none;
}

.fruit-form-textarea {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 120px;
  resize: vertical;
  transition: all 0.3s;
}

.fruit-form-textarea:focus {
  border-color: var(--fruit-green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
  outline: none;
}

.fruit-form-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.fruit-form-checkbox input {
  margin-right: 10px;
}

.fruit-form-button {
  background: var(--fruit-green);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
}

.fruit-form-button:hover {
  background: var(--fruit-light-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fruit-form-footer {
  text-align: center;
  margin-top: 20px;
  color: #888;
  font-size: 14px;
}

.fruit-form-footer a {
  color: var(--fruit-green);
  text-decoration: none;
}

.fruit-form-footer a:hover {
  text-decoration: underline;
} 